/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.garantiasDAO;
import DTO.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class RelacionGarantiaOperacion extends javax.swing.JFrame {

   usuarioDTO user;
   garantiasDAO reg = new garantiasDAO();
   String auxNombre = "";
   relacionGarantiaOperacionHipoDTO hipo;
   relacionGarantiaOperacionAutoDTO auto;
   relacionGarantiaOperacionCdpDTO cdp;
   relacionGarantiaOperacionWarraDTO warra;
    
    public RelacionGarantiaOperacion(usuarioDTO user) {
        initComponents();
        this.user = user;
        this.btnGuardarRelac.setVisible(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblLogo = new javax.swing.JLabel();
        lblIngresoGaraAuto = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel10 = new javax.swing.JPanel();
        pnlHipotecaria = new javax.swing.JPanel();
        txtHipoRelac = new javax.swing.JTextField();
        btnHipoRel = new javax.swing.JButton();
        pnlAutomotriz = new javax.swing.JPanel();
        txtAutoRelac = new javax.swing.JTextField();
        btnAutoRelac = new javax.swing.JButton();
        pnlWarrant = new javax.swing.JPanel();
        txtWarraRelac = new javax.swing.JTextField();
        btnWarraRelac = new javax.swing.JButton();
        pnlCdp = new javax.swing.JPanel();
        txtCDPRelac = new javax.swing.JTextField();
        btnCDPRelac = new javax.swing.JButton();
        pnlDatosPersoGara1 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombreRelac = new javax.swing.JTextField();
        txtApellMatRelac = new javax.swing.JTextField();
        txtApellPatRel = new javax.swing.JTextField();
        txtRutRelac = new javax.swing.JTextField();
        btnMenuRelac = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentarioRelac = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionRelac = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        btnGuardarRelac = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtReperRel = new javax.swing.JTextField();
        txtNotariaRel = new javax.swing.JTextField();
        txtValorRel = new javax.swing.JTextField();
        txtImptoRel = new javax.swing.JTextField();
        jcFechaConstitucion = new com.toedter.calendar.JDateChooser();
        jButton1 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("RELACIÓN GARANTÍA OPERACIÓN");
        setResizable(false);

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        lblIngresoGaraAuto.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        lblIngresoGaraAuto.setText("RELACIÓN GARANTÍA - OPERACIÓN");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        pnlHipotecaria.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnHipoRel.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnHipoRel.setText("BUSCAR");
        btnHipoRel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHipoRelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlHipotecariaLayout = new javax.swing.GroupLayout(pnlHipotecaria);
        pnlHipotecaria.setLayout(pnlHipotecariaLayout);
        pnlHipotecariaLayout.setHorizontalGroup(
            pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipotecariaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtHipoRelac)
                    .addComponent(btnHipoRel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlHipotecariaLayout.setVerticalGroup(
            pnlHipotecariaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHipotecariaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtHipoRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnHipoRel))
        );

        pnlAutomotriz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnAutoRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnAutoRelac.setText("BUSCAR");
        btnAutoRelac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAutoRelacActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlAutomotrizLayout = new javax.swing.GroupLayout(pnlAutomotriz);
        pnlAutomotriz.setLayout(pnlAutomotrizLayout);
        pnlAutomotrizLayout.setHorizontalGroup(
            pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutomotrizLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtAutoRelac)
                    .addComponent(btnAutoRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlAutomotrizLayout.setVerticalGroup(
            pnlAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAutomotrizLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtAutoRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAutoRelac, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlWarrant.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE CÓDIGO ÚNICO (D.U.N 14)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnWarraRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnWarraRelac.setText("BUSCAR");
        btnWarraRelac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnWarraRelacActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlWarrantLayout = new javax.swing.GroupLayout(pnlWarrant);
        pnlWarrant.setLayout(pnlWarrantLayout);
        pnlWarrantLayout.setHorizontalGroup(
            pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarrantLayout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addGroup(pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnWarraRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtWarraRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        pnlWarrantLayout.setVerticalGroup(
            pnlWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlWarrantLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtWarraRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnWarraRelac))
        );

        pnlCdp.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NUMERO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnCDPRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnCDPRelac.setText("BUSCAR");
        btnCDPRelac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCDPRelacActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlCdpLayout = new javax.swing.GroupLayout(pnlCdp);
        pnlCdp.setLayout(pnlCdpLayout);
        pnlCdpLayout.setHorizontalGroup(
            pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCdpLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtCDPRelac)
                    .addComponent(btnCDPRelac, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlCdpLayout.setVerticalGroup(
            pnlCdpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCdpLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtCDPRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnCDPRelac))
        );

        pnlDatosPersoGara1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombreRelac.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreRelac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreRelac.setEnabled(false);

        txtApellMatRelac.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatRelac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatRelac.setEnabled(false);

        txtApellPatRel.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatRel.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatRel.setEnabled(false);

        txtRutRelac.setBackground(new java.awt.Color(255, 255, 102));
        txtRutRelac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutRelac.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatRel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 150, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNombreRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellMatRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombreRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatRel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMatRelac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGara1Layout = new javax.swing.GroupLayout(pnlDatosPersoGara1);
        pnlDatosPersoGara1.setLayout(pnlDatosPersoGara1Layout);
        pnlDatosPersoGara1Layout.setHorizontalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGara1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGara1Layout.setVerticalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGara1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnMenuRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuRelac.setText("MENÚ PRINCIPAL");
        btnMenuRelac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuRelacActionPerformed(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("HIPOTECARIA");

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("AUTOMOTRIZ");

        jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel17.setText("WARRANT");

        jLabel18.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel18.setText("CDP");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(btnMenuRelac, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel10Layout.createSequentialGroup()
                                        .addGap(42, 42, 42)
                                        .addComponent(pnlHipotecaria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(pnlCdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(0, 0, Short.MAX_VALUE))))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGap(74, 74, 74)
                        .addComponent(jLabel15)
                        .addGap(71, 71, 71)
                        .addComponent(jLabel16)
                        .addGap(109, 109, 109)
                        .addComponent(jLabel17)
                        .addGap(140, 140, 140)
                        .addComponent(jLabel18)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel15)
                    .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel16)
                        .addComponent(jLabel17)
                        .addComponent(jLabel18)))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(pnlAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(pnlHipotecaria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(pnlWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlCdp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(53, 53, 53)
                .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 103, Short.MAX_VALUE)
                .addComponent(btnMenuRelac)
                .addGap(65, 65, 65))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel10);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentarioRelac.setBackground(new java.awt.Color(255, 255, 102));
        txtOtroComentarioRelac.setColumns(20);
        txtOtroComentarioRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentarioRelac.setRows(5);
        txtOtroComentarioRelac.setToolTipText("");
        txtOtroComentarioRelac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtOtroComentarioRelac.setEnabled(false);
        jScrollPane3.setViewportView(txtOtroComentarioRelac);

        txtDescripcionRelac.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionRelac.setColumns(20);
        txtDescripcionRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionRelac.setRows(5);
        txtDescripcionRelac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionRelac.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionRelac);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 661, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(250, 250, 250))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(119, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 870, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 489, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel12);

        btnGuardarRelac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnGuardarRelac.setText("GRABAR");
        btnGuardarRelac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarRelacActionPerformed(evt);
            }
        });

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "RELACIÓN GARANTIA OPERACIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel2.setText("VALOR OPERACIÓN");

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("FECHA CONSTITUCIÓN GTÍA.");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("NOTARÍA");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("REPERTORIO");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("VALOR IMPTO. TIMBRES ESTAMP.");

        txtValorRel.setDisabledTextColor(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel6))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtValorRel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jcFechaConstitucion, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 249, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtReperRel, javax.swing.GroupLayout.DEFAULT_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtNotariaRel, javax.swing.GroupLayout.DEFAULT_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtImptoRel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNotariaRel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtReperRel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(txtValorRel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel6)
                                    .addComponent(txtImptoRel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jcFechaConstitucion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(255, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton1.setText("MENÚ PRINCIPAL >>");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                .addContainerGap(441, Short.MAX_VALUE)
                .addComponent(btnGuardarRelac)
                .addGap(157, 157, 157)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(42, 42, 42))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(btnGuardarRelac))
                .addGap(62, 62, 62))
        );

        jTabbedPane1.addTab("RELACIÓN GTÍA. - OPERACÍON", jPanel13);

        jLabel1.setText("MENÚ PRINCIPAL\\RELACIÓN GARANTÍA OPERACIÓN");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblLogo)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(114, 114, 114)
                        .addComponent(lblIngresoGaraAuto))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 875, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblIngresoGaraAuto)
                    .addComponent(lblLogo)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1))
        );

        setSize(new java.awt.Dimension(891, 660));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnMenuRelacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuRelacActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        RelacionGarantiaOperacion.this.dispose();
    }//GEN-LAST:event_btnMenuRelacActionPerformed

    private void btnHipoRelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHipoRelActionPerformed
        if (txtHipoRelac.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese ROL");
            limpiar2();
            this.txtHipoRelac.setText(null);
            this.txtAutoRelac.setText(null);
            this.txtWarraRelac.setText(null);
            this.txtCDPRelac.setText(null);
        }
        else
        {
            hipo = reg.BuscarRelacionOperacionHipo(txtHipoRelac.getText());
            if (hipo.getId_gara_ope() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue asignada a una RELACION-OPERACION. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE RELACION-OPERACION.");
                txtRutRelac.setText(hipo.getHipo().getRut_gara_hipo());
//                txtFolioRelac.setText(String.valueOf(hipo.getHipo().getFolio_garantia_hipo()));
                txtApellMatRelac.setText(hipo.getHipo().getApell_materno_hipo());
                txtApellPatRel.setText(hipo.getHipo().getApell_paterno_hipo());
                txtNombreRelac.setText(hipo.getHipo().getNombre_hipo());
                txtDescripcionRelac.setText(hipo.getHipo().getDescrip_hipo());
                txtOtroComentarioRelac.setText(hipo.getHipo().getComent_hipo());
                txtValorRel.setText(String.valueOf(hipo.getValor_opera_gara_ope()));
                txtImptoRel.setText(String.valueOf(hipo.getValor_impto_tim_gara_ope()));
                txtNotariaRel.setText(hipo.getNotaria_gara_ope());
                txtReperRel.setText(hipo.getRepert_gara_ope());
                Date fcons = DTO.ConversionFechas.convertToDate(hipo.getFech_consti_gara_ope());
                jcFechaConstitucion.setDate(fcons);
//                ocultarPanel(pnlHipotecaria);
                TasacionHecha();
                
                this.txtAutoRelac.setText(null);
                this.txtWarraRelac.setText(null);
                this.txtCDPRelac.setText(null);
            }
            else
            {
                garantiaHipotecariaDTO aux = reg.buscarPorRol(txtHipoRelac.getText());
                hipo.setHipo(aux);
                if (hipo.getHipo().getFolio_garantia_hipo() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    txtHipoRelac.setText("");
                    limpiar2();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                }
                else
                {
                    txtRutRelac.setText(hipo.getHipo().getRut_gara_hipo());
//                    txtFolioRelac.setText(String.valueOf(hipo.getHipo().getFolio_garantia_hipo()));
                    txtApellMatRelac.setText(hipo.getHipo().getApell_materno_hipo());
                    txtApellPatRel.setText(hipo.getHipo().getApell_paterno_hipo());
                    txtNombreRelac.setText(hipo.getHipo().getNombre_hipo());
                    txtDescripcionRelac.setText(hipo.getHipo().getDescrip_hipo());
                    txtOtroComentarioRelac.setText(hipo.getHipo().getComent_hipo());
                    auxNombre = "Hipotecaria";
                    TasacionNoHecha();
                    limpiar();
                    
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlHipotecaria);
                }
            }
        }
    }//GEN-LAST:event_btnHipoRelActionPerformed

    private void btnAutoRelacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAutoRelacActionPerformed
        if (txtAutoRelac.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese PATENTE");
            limpiar2();
            this.txtHipoRelac.setText(null);
            this.txtAutoRelac.setText(null);
            this.txtWarraRelac.setText(null);
            this.txtCDPRelac.setText(null);
        }
        else
        {
            auto = reg.BuscarRelacionOperacionAuto(txtAutoRelac.getText());
            if (auto.getId_gara_ope() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue asignada a una RELACION-OPERACION. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE RELACION-OPERACION.");
                txtRutRelac.setText(auto.getAuto().getRut_gara_auto());
//                txtFolioRelac.setText(String.valueOf(auto.getAuto().getFolio_garantia_auto()));
                txtApellMatRelac.setText(auto.getAuto().getApell_materno_auto());
                txtApellPatRel.setText(auto.getAuto().getApell_paterno_auto());
                txtNombreRelac.setText(auto.getAuto().getNombre_auto());
                txtDescripcionRelac.setText(auto.getAuto().getDescrip_auto());
                txtOtroComentarioRelac.setText(auto.getAuto().getComent_auto());
                txtValorRel.setText(String.valueOf(auto.getValor_opera_gara_ope()));
                txtImptoRel.setText(String.valueOf(auto.getValor_impto_tim_gara_ope()));
                txtNotariaRel.setText(auto.getNotaria_gara_ope());
                txtReperRel.setText(auto.getRepert_gara_ope());
                Date fcons = DTO.ConversionFechas.convertToDate(auto.getFech_consti_gara_ope());
                jcFechaConstitucion.setDate(fcons);
//                ocultarPanel(pnlAutomotriz);
                TasacionHecha();
                
                this.txtAutoRelac.setText(null);
                this.txtWarraRelac.setText(null);
                this.txtCDPRelac.setText(null);
            }
            else
            {
                garantiaAutomotrizDTO aux = reg.buscarPorPatente(txtAutoRelac.getText());
                auto.setAuto(aux);
                if (auto.getAuto().getFolio_garantia_auto() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    txtAutoRelac.setText("");
                    limpiar2();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                }
                else
                {   
                    txtRutRelac.setText(auto.getAuto().getRut_gara_auto());
//                    txtFolioRelac.setText(String.valueOf(auto.getAuto().getFolio_garantia_auto()));
                    txtApellMatRelac.setText(auto.getAuto().getApell_materno_auto());
                    txtApellPatRel.setText(auto.getAuto().getApell_paterno_auto());
                    txtNombreRelac.setText(auto.getAuto().getNombre_auto());
                    txtDescripcionRelac.setText(auto.getAuto().getDescrip_auto());
                    txtOtroComentarioRelac.setText(auto.getAuto().getComent_auto());
                    auxNombre = "Automotriz";
                    TasacionNoHecha();
                    limpiar();
                    this.txtHipoRelac.setText(null);
                    
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlAutomotriz);
                }
            }
        }
    }//GEN-LAST:event_btnAutoRelacActionPerformed

    private void btnWarraRelacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnWarraRelacActionPerformed
        if (txtWarraRelac.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese DUN");
            limpiar2();
            this.txtHipoRelac.setText(null);
            this.txtAutoRelac.setText(null);
            this.txtWarraRelac.setText(null);
            this.txtCDPRelac.setText(null);
        }
        else
        {
            warra = reg.BuscarRelacionOperacionWarra(txtWarraRelac.getText());
            if (warra.getId_gara_ope() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue asignada a una RELACION-OPERACION. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE RELACION-OPERACION.");
                txtRutRelac.setText(warra.getWarra().getRut_garante_warra());
//                txtFolioRelac.setText(String.valueOf(warra.getWarra().getFolio_warra()));
                txtApellMatRelac.setText(warra.getWarra().getApell_materno_warra());
                txtApellPatRel.setText(warra.getWarra().getApell_paterno_warra());
                txtNombreRelac.setText(warra.getWarra().getNombre_warra());
                txtDescripcionRelac.setText(warra.getWarra().getDescrip_warra());
                txtOtroComentarioRelac.setText(warra.getWarra().getComent_warra());
                txtValorRel.setText(String.valueOf(warra.getValor_opera_gara_ope()));
                txtImptoRel.setText(String.valueOf(warra.getValor_impto_tim_gara_ope()));
                txtNotariaRel.setText(warra.getNotaria_gara_ope());
                txtReperRel.setText(warra.getRepert_gara_ope());
                Date fcons = DTO.ConversionFechas.convertToDate(warra.getFech_consti_gara_ope());
                jcFechaConstitucion.setDate(fcons);
//                ocultarPanel(pnlWarrant);
                TasacionHecha();
                this.txtHipoRelac.setText(null);
                this.txtAutoRelac.setText(null);         
                this.txtCDPRelac.setText(null);
            }
            else
            {
                garantiaWarrantsDTO aux = reg.buscarPorDUN(txtWarraRelac.getText());
                warra.setWarra(aux);
                if (warra.getWarra().getFolio_warra() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    
                    limpiar2();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                }
                else
                {
                    txtRutRelac.setText(warra.getWarra().getRut_garante_warra());
//                    txtFolioRelac.setText(String.valueOf(warra.getWarra().getFolio_warra()));
                    txtApellMatRelac.setText(warra.getWarra().getApell_materno_warra());
                    txtApellPatRel.setText(warra.getWarra().getApell_paterno_warra());
                    txtNombreRelac.setText(warra.getWarra().getNombre_warra());
                    txtDescripcionRelac.setText(warra.getWarra().getDescrip_warra());
                    txtOtroComentarioRelac.setText(warra.getWarra().getComent_warra());
                    auxNombre = "Warrant";
                    TasacionNoHecha();
                    limpiar();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlWarrant);
                }
            }
        }
    }//GEN-LAST:event_btnWarraRelacActionPerformed

    private void btnCDPRelacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCDPRelacActionPerformed
        if (txtCDPRelac.getText().equals("")) {
            javax.swing.JOptionPane.showMessageDialog(null, "Ingrese NUMERO CDP");
            limpiar2();
            this.txtHipoRelac.setText(null);
            this.txtAutoRelac.setText(null);
            this.txtWarraRelac.setText(null);
            this.txtCDPRelac.setText(null);
        }
        else
        {
            cdp = reg.BuscarRelacionOperacionCdp(Integer.parseInt(txtCDPRelac.getText()));
            if (cdp.getId_gara_ope() != 0) {
                javax.swing.JOptionPane.showMessageDialog(null, "Esta Garantia ya fue asignada a una RELACION-OPERACION. \n Para cualquier modificacion, vaya al modulo de MANTENCION DE RELACION-OPERACION.");
                txtRutRelac.setText(cdp.getCdp().getRut_gara_cdp());
//                txtFolioRelac.setText(String.valueOf(cdp.getCdp().getFolio_cdp()));
                txtApellMatRelac.setText(cdp.getCdp().getApell_materno_cdp());
                txtApellPatRel.setText(cdp.getCdp().getApell_paterno_cdp());
                txtNombreRelac.setText(cdp.getCdp().getNombre_cdp());
                txtDescripcionRelac.setText(cdp.getCdp().getDescrip_cdp());
                txtOtroComentarioRelac.setText(cdp.getCdp().getComent_cdp());
                auxNombre = cdp.getCdp().getNombre_cdp();
                txtValorRel.setText(String.valueOf(cdp.getValor_opera_gara_ope()));
                txtImptoRel.setText(String.valueOf(cdp.getValor_impto_tim_gara_ope()));
                txtNotariaRel.setText(cdp.getNotaria_gara_ope());
                txtReperRel.setText(cdp.getRepert_gara_ope());
                Date fcons = DTO.ConversionFechas.convertToDate(cdp.getFech_consti_gara_ope());
                jcFechaConstitucion.setDate(fcons);
//                ocultarPanel(pnlCdp);
                TasacionHecha();
                this.txtHipoRelac.setText(null);
                this.txtAutoRelac.setText(null);
                this.txtWarraRelac.setText(null);
                
            }
            else
            {
                garantiaCdpOtrosDTO aux = reg.buscarPorNum(Integer.parseInt(txtCDPRelac.getText().trim()));
                cdp.setCdp(aux);
                if (cdp.getCdp().getFolio_cdp() == 0) {
                    javax.swing.JOptionPane.showMessageDialog(null, "Garantia No Encontrada!");
                    
                    limpiar2();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    this.txtCDPRelac.setText(null);
                }
                else
                {
                    txtRutRelac.setText(cdp.getCdp().getRut_gara_cdp());
//                    txtFolioRelac.setText(String.valueOf(cdp.getCdp().getFolio_cdp()));
                    txtApellMatRelac.setText(cdp.getCdp().getApell_materno_cdp());
                    txtApellPatRel.setText(cdp.getCdp().getApell_paterno_cdp());
                    txtNombreRelac.setText(cdp.getCdp().getNombre_cdp());
                    txtDescripcionRelac.setText(cdp.getCdp().getDescrip_cdp());
                    txtOtroComentarioRelac.setText(cdp.getCdp().getComent_cdp());
                    auxNombre = "CDP";
                    TasacionNoHecha();
                    limpiar();
                    this.txtHipoRelac.setText(null);
                    this.txtAutoRelac.setText(null);
                    this.txtWarraRelac.setText(null);
                    
                    //metoto que oculta los paneles que no se ocupan
//                    ocultarPanel(pnlCdp);
                }
            }
        }
    }//GEN-LAST:event_btnCDPRelacActionPerformed

    private void btnGuardarRelacActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarRelacActionPerformed
        switch(auxNombre)
        {
            case "Hipotecaria":
                if (!txtValorRel.getText().equals("")) {
                    hipo.setValor_opera_gara_ope(Integer.parseInt(txtValorRel.getText().trim()));
                }
                if (jcFechaConstitucion.getDate() != null) {
                    hipo.setFech_consti_gara_ope(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaConstitucion.getDate()));
                }
                if (!txtImptoRel.getText().equals("")) {
                    hipo.setValor_impto_tim_gara_ope(Integer.parseInt(txtImptoRel.getText().trim()));
                }
                if (!txtNotariaRel.getText().equals("")) {
                    hipo.setNotaria_gara_ope(txtNotariaRel.getText());
                }
                if (!txtReperRel.getText().equals("")) {
                    hipo.setRepert_gara_ope(txtReperRel.getText());
                }
                int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion-Operacion: HIPOTECARIA", "RELACION-OPERACION", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta == 0) {
                    reg.RelOperacionGarantiaHipo(hipo, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Relacion Operacion Exitosa!");
                    MenuPrincipal admi = new MenuPrincipal(user);
                    admi.setVisible(true);
                    RelacionGarantiaOperacion.this.dispose();
                }
                else
                {
                    
                }
                break;
            case "Automotriz":
                if (!txtValorRel.getText().equals("")) {
                    auto.setValor_opera_gara_ope(Integer.parseInt(txtValorRel.getText().trim()));
                }
                if (jcFechaConstitucion.getDate() != null) {
                    auto.setFech_consti_gara_ope(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaConstitucion.getDate()));
                }
                if (!txtImptoRel.getText().equals("")) {
                    auto.setValor_impto_tim_gara_ope(Integer.parseInt(txtImptoRel.getText().trim()));
                }
                if (!txtNotariaRel.getText().equals("")) {
                    auto.setNotaria_gara_ope(txtNotariaRel.getText());
                }
                if (!txtReperRel.getText().equals("")) {
                    auto.setRepert_gara_ope(txtReperRel.getText());
                }
                int respuesta1 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion-Operacion: AUTOMOTRIZ", "RELACION-OPERACION", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta1 == 0) {
                    reg.RelOperacionGarantiaAuto(auto, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Relacion Operacion Exitosa!");
                    MenuPrincipal admi = new MenuPrincipal(user);
                    admi.setVisible(true);
                    RelacionGarantiaOperacion.this.dispose();
                }
                else
                {
                    
                }
                break;
           case "Warrant":
                if (!txtValorRel.getText().equals("")) {
                    warra.setValor_opera_gara_ope(Integer.parseInt(txtValorRel.getText().trim()));
                }
                if (jcFechaConstitucion.getDate() != null) {
                    warra.setFech_consti_gara_ope(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaConstitucion.getDate()));
                }
                if (!txtImptoRel.getText().equals("")) {
                    warra.setValor_impto_tim_gara_ope(Integer.parseInt(txtImptoRel.getText().trim()));
                }
                if (!txtNotariaRel.getText().equals("")) {
                   warra.setNotaria_gara_ope(txtNotariaRel.getText());
                }
                if (!txtReperRel.getText().equals("")) {
                    warra.setRepert_gara_ope(txtReperRel.getText());
                }
                int respuesta2 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion-Operacion: WARRANT", "RELACION-OPERACION", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta2 == 0) {
                    reg.RelOperacionGarantiaWarra(warra, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Relacion Operacion Exitosa!");
                    MenuPrincipal admi = new MenuPrincipal(user);
                    admi.setVisible(true);
                    RelacionGarantiaOperacion.this.dispose();
                }
                else
                {
                    
                }
                break;     
           case "CDP":
               // tasacionGarantiaCdpDTO tasaCDP = new tasacionGarantiaCdpDTO();
                 if (!txtValorRel.getText().equals("")) {
                    cdp.setValor_opera_gara_ope(Integer.parseInt(txtValorRel.getText().trim()));
                }
                if (jcFechaConstitucion.getDate() != null) {
                    cdp.setFech_consti_gara_ope(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaConstitucion.getDate()));
                }
                if (!txtImptoRel.getText().equals("")) {
                    cdp.setValor_impto_tim_gara_ope(Integer.parseInt(txtImptoRel.getText().trim()));
                }
                if (!txtNotariaRel.getText().equals("")) {
                   cdp.setNotaria_gara_ope(txtNotariaRel.getText());
                }
                if (!txtReperRel.getText().equals("")) {
                    cdp.setRepert_gara_ope(txtReperRel.getText());
                }
                int respuesta3 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion-Operacion: CDP", "RELACION-OPERACION", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta3 == 0) {
                    reg.RelOperacionGarantiaCDP(cdp, user);
                    javax.swing.JOptionPane.showMessageDialog(null, "Relacion Operacion Exitosa!");
                    MenuPrincipal admi = new MenuPrincipal(user);
                    admi.setVisible(true);
                    RelacionGarantiaOperacion.this.dispose();
                }
                else
                {
                    
                }
                break;
        }
    }//GEN-LAST:event_btnGuardarRelacActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        RelacionGarantiaOperacion.this.dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void TasacionHecha()
    {
        btnGuardarRelac.setVisible(false);
        txtValorRel.setEditable(true);
        txtImptoRel.setEditable(true);
        txtNotariaRel.setEditable(true);
        txtReperRel.setEditable(true);
        jcFechaConstitucion.setEnabled(true);
    }
    
    private void TasacionNoHecha()
    {
        btnGuardarRelac.setVisible(true);
        txtValorRel.setEditable(true);
        txtImptoRel.setEditable(true);
        txtNotariaRel.setEditable(true);
        txtReperRel.setEditable(true);
        jcFechaConstitucion.setEnabled(true);
    }
    
//    private void ocultarPanel(JPanel panel)
//    {
//        pnlAutomotriz.setEnabled(false);
//        pnlCdp.setEnabled(false);
//        pnlHipotecaria.setEnabled(false);
//        pnlWarrant.setEnabled(false);
//        /*BOTONES*/
//        txtHipoRelac.setEditable(false);
//        btnHipoRel.setEnabled(false);
//        txtAutoRelac.setEditable(false);
//        btnAutoRelac.setEnabled(false);
//        txtWarraRelac.setEditable(false);
//        btnWarraRelac.setEnabled(false);
//        txtCDPRelac.setEditable(false);
//        btnCDPRelac.setEnabled(false);
//        panel.setEnabled(true);
//    }
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(RelacionGarantiaOperacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(RelacionGarantiaOperacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(RelacionGarantiaOperacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(RelacionGarantiaOperacion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new RelacionGarantiaOperacion().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAutoRelac;
    private javax.swing.JButton btnCDPRelac;
    private javax.swing.JButton btnGuardarRelac;
    private javax.swing.JButton btnHipoRel;
    private javax.swing.JButton btnMenuRelac;
    private javax.swing.JButton btnWarraRelac;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private com.toedter.calendar.JDateChooser jcFechaConstitucion;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblIngresoGaraAuto;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JPanel pnlAutomotriz;
    private javax.swing.JPanel pnlCdp;
    private javax.swing.JPanel pnlDatosPersoGara1;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JPanel pnlHipotecaria;
    private javax.swing.JPanel pnlWarrant;
    private javax.swing.JTextField txtApellMatRelac;
    private javax.swing.JTextField txtApellPatRel;
    private javax.swing.JTextField txtAutoRelac;
    private javax.swing.JTextField txtCDPRelac;
    private javax.swing.JTextArea txtDescripcionRelac;
    private javax.swing.JTextField txtHipoRelac;
    private javax.swing.JTextField txtImptoRel;
    private javax.swing.JTextField txtNombreRelac;
    private javax.swing.JTextField txtNotariaRel;
    private javax.swing.JTextArea txtOtroComentarioRelac;
    private javax.swing.JTextField txtReperRel;
    private javax.swing.JTextField txtRutRelac;
    private javax.swing.JTextField txtValorRel;
    private javax.swing.JTextField txtWarraRelac;
    // End of variables declaration//GEN-END:variables

    private void limpiar2() {
        txtValorRel.setText(null);
        txtImptoRel.setText(null);
        txtNotariaRel.setText(null);
        txtReperRel.setText(null);
        jcFechaConstitucion.setCalendar(null);
        txtRutRelac.setText(null);
//        txtFolioRelac.setText(null);
        txtApellMatRelac.setText(null);
        txtApellPatRel.setText(null);
        txtNombreRelac.setText(null);
        txtDescripcionRelac.setText(null);
        txtOtroComentarioRelac.setText(null);
        btnGuardarRelac.setVisible(false);
    }

    private void limpiar() {
        txtValorRel.setText(null);
        txtImptoRel.setText(null);
        txtNotariaRel.setText(null);
        txtReperRel.setText(null);
        jcFechaConstitucion.setCalendar(null);
    }
}
